<?php

class Promotion extends AppModel{
     public $validate = array('nombre'=>array(
                                'rule'=>'notEmpty'));
    
    
    public $displayField = 'nombre';
    public $hasAndBelongsToMany = array(
            'Product' => array (
                'className' => 'Product',
                'foreignKey'=> 'product_id',
                'dependent' => true            
                )        
    );      
     
     
   // public $displayField = 'nombre';
   // public $hasMany = array(
   //         'Product' => array (
   //             'className' => 'Product',
   //             'foreignKey'=> 'promotion_id',
   //             'dependent' => true            
   //             )        
   // );    
}
